<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>面向对象</title>
</head>
<body>
   <script>
     var person={
          name:['Bob','Smith'],
          age:32,
          gender:'male',
          interests:['music','sking'],
          bio:function(){
              alert(
                  `${this.name[0]} ${this.name[1]} is ${this.age} years old.he likes ${this.interests[0]} and ${this.interests[1]}.`
              );
          },
          greeting:function(){
              alert("hi I'm"+this.name[0]+".");
          }
     }

     person.name[0];
     person.age;
     person.interests[1];
     person.bio();
     person.greeting();

   </script>
</body>
</html>